<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="admin/_fragments::head(~{::title})">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>博客管理登录</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
    <link rel="stylesheet" href="../../static/css/my.css">
</head>
<style>
    html{
        width: 100%;
        height: 100%!important;
    }
</style>
<body>
<div class="my-container-small my-padded-tb-massive" style="max-width: 30em!important; margin-top: 3em!important;">
    <div class="ui middle aligned center aligned grid">
        <div class="column ui segment">
            <div class="ui container" align="center" >
                <img src="https://picsum.photos/100/100?image=1027" alt=""
                     class="ui circular image">
            </div>
            <div class="content my-font-style" align="center" style="margin-top: 0.5em;font-size: 20px">迪迪崽崽</div>

            <form class="ui large form" method="post" th:action="@{/admin/login}">
                <div class="ui segment">
                    <div class="field">
                        <div class="ui left icon input">
                            <i class="user icon"></i>
                            <input type="text" name="username" placeholder="用户名">
                        </div>
                    </div>
                    <div class="field">
                        <div class="ui left icon input">
                            <i class="lock icon"></i>
                            <input type="password" name="password" placeholder="密码">
                        </div>
                    </div>
                    <button class="ui fluid large teal submit button">登录</button>
                </div>

                <div class="ui mini error message"></div>
                <div class="ui mini negative message" th:unless="${#strings.isEmpty(message)}" th:text="${message}">用户名和密码错误</div>
            </form>
        </div>
    </div>
</div>
<!--导航-->

<!--中间内容-->



<!--尾部-->


<th:block th:replace="_fragments::script">
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
</th:block>
<script>
    $('.ui.form').form({
        fields: {
            username: {
                identifier: 'username',
                rules: [{
                    type: 'empty',
                    prompt: '标题:请输入用户名'
                }]
            },
            password:{
                identifier: 'password',
                rules: [{
                    type: 'empty',
                    prompt: '标题:请输入密码'
                }]
            }
        }
    });
    $('.menu.toggle').click(function () {
       $('.m-item').toggleClass('m-mobile-hide')
    });
    $('.ui.dropdown').dropdown({
        on:'hover'
    });
</script>

</body>
</html>